/*********************\
* Author:Dzlua
* QQ:505544956
* Time:2017/04/15
\**********************/
#include "LuaCheckBox.h"

#define CObjPtr ((CCheckBoxUI*)m_cobj)

namespace DuiLib {

void LuaCheckBox::SetCheck(bool bCheck)
{
    CObjPtr->SetCheck(bCheck);
}

bool LuaCheckBox::GetCheck()
{
    return CObjPtr->GetCheck();
}

void LuaCheckBox::SetAutoCheck(bool bEnable)
{
    CObjPtr->SetAutoCheck(bEnable);
}

void LuaCheckBox::Selected(bool bSelected)
{
    CObjPtr->Selected(bSelected);
}

SDLUA_BEGIN_REGISTER(LuaCheckBox, CheckBox, Option)
    SDLUA_REGISTER_FUN_CPP(LuaCheckBox, SetCheck, SetCheck)
    SDLUA_REGISTER_FUN_CPP(LuaCheckBox, GetCheck, GetCheck)
    SDLUA_REGISTER_FUN_CPP(LuaCheckBox, SetAutoCheck, SetAutoCheck)
    SDLUA_REGISTER_FUN_CPP(LuaCheckBox, Selected, Selected)
SDLUA_END_REGISTER

SDLUA_BEGIN_UNREGISTER(LuaCheckBox, CheckBox)
SDLUA_END_UNREGISTER(CheckBox)

}

#undef CObjPtr